package com.ukao.steward.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by kefu001 on 2018/4/21.
 */

public class ShopClothingFragmentPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> fragmentList;
    public ShopClothingFragmentPagerAdapter(FragmentManager fm, List<Fragment> fragmentList) {
        super(fm);
        this.fragmentList=fragmentList;
    }

    /**\
     *  获得Fragment的下标
     * @param position
     * @return
     */
    @Override
    public Fragment getItem(int position) {

        return fragmentList.get(position);
    }

    /**
     * 获得Fragment的数量
     * @return
     */
    @Override
    public int getCount() {
        return fragmentList.size();
    }
}
